/**
 * 
 */

package com.wutianyi.interesting;

/**
 * @author wutianyi
 * 
 */
public class Demo_2 {

	private static void foo(int i) {

		try {
			if(i == 2) {
				return;
			}
			System.out.println("try");
			++i;
			foo(i);
			System.out.println("end: " + i);
		}catch(Throwable e) {
			System.out.println("catch");
			foo(i);
		}finally {
			System.out.println("finally");
			foo(i);
		}
	}

	public static void main(String[] args) {

		// int A;
		//		
		// if(1 != 1)
		// A = 1;
		// System.out.println(A);
		foo(0);
	}
}
